// 获取选课日志

import axios from "axios";

export default function () {
    return axios({
        method: "get",
        url: "/api/selections/logs",
        header: {
            Authorization: localStorage.getItem("Authorization")
        }
    }).then(response => {
        for (let i = 0; i < response.data.logs.length; i++) {
            response.data.logs[i].key = i;
        }
        return {
            result: true,
            logs: response.data.logs
        }
    }).catch(error => {
        return {
            result: false,
            msg: error.response.data.msg
        }
    })
}